package com.example.mydy.model;

/**
 * 任务记录模型类
 */
public class TaskRecord {
    // 任务状态常量
    public static final int STATUS_PENDING = 0;   // 待审核
    public static final int STATUS_APPROVED = 1;  // 已通过
    public static final int STATUS_REJECTED = 2;  // 已拒绝
    public static final int STATUS_COMPLETED = 3; // 已完成

    private int id;
    private int taskId;     // 任务ID
    private String username;
    private String taskName;        // 任务名称
    private String taskDescription; // 任务描述
    private double reward;         // 奖励金额
    private int status;            // 状态
    private String completionTime; // 完成时间
    private String approvalTime;   // 审核时间
    private String remark;         // 备注（拒绝原因等）

    public TaskRecord() {
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getTaskId() {
        return taskId;
    }

    public void setTaskId(int taskId) {
        this.taskId = taskId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getTaskName() {
        return taskName;
    }

    public void setTaskName(String taskName) {
        this.taskName = taskName;
    }

    public String getTaskDescription() {
        return taskDescription;
    }

    public void setTaskDescription(String taskDescription) {
        this.taskDescription = taskDescription;
    }

    public double getReward() {
        return reward;
    }

    public void setReward(double reward) {
        this.reward = reward;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getCompletionTime() {
        return completionTime;
    }

    public void setCompletionTime(String completionTime) {
        this.completionTime = completionTime;
    }

    public String getApprovalTime() {
        return approvalTime;
    }

    public void setApprovalTime(String approvalTime) {
        this.approvalTime = approvalTime;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    /**
     * 获取状态的文本描述
     * @return 状态描述
     */
    public String getStatusText() {
        switch (status) {
            case STATUS_PENDING:
                return "待审核";
            case STATUS_APPROVED:
                return "已通过";
            case STATUS_REJECTED:
                return "已拒绝";
            case STATUS_COMPLETED:
                return "已完成";
            default:
                return "未知状态";
        }
    }
} 